{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Basic RigolWFM Usage\n",
    "\n",
    "**Scott Prahl**\n",
    "\n",
    "**March 2021**\n",
    "\n",
    "This notebook contains a short overview of the RigolWFM parser for waveform `.wfm` files created by Rigol oscilloscopes.\n",
    "\n",
    "```python\n",
    "    import matplotlib.pyplot as plt\n",
    "    import RigolWFM.wfm as rigol\n",
    "\n",
    "    model = \"DS1102E'\n",
    "    filename = \"localfile.wfm\"\n",
    "    scope_data = rigol.Wfm.from_file(filename, model)\n",
    "    description = scope_data.describe()\n",
    "    print(description)\n",
    "    \n",
    "    url = \"https://somewebsite.com/path/file.wfm\"\n",
    "    scope_data = rigol.Wfm.from_url(url, model)\n",
    "    for ch in scope_data.channels:\n",
    "        plt.plot(ch.times, ch.volts, label=ch.name)\n",
    "    plt.legend()\n",
    "    plt.show()\n",
    "```\n",
    "\n",
    "*If RigolWFM is not installed, uncomment the following cell (i.e., delete the #) and run (shift-enter)*"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#!pip install --user RigolWFM"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "try:\n",
    "    import RigolWFM.wfm as rigol\n",
    "except ModuleNotFoundError:\n",
    "    print('RigolWFM not installed. To install, uncomment and run the cell above.')\n",
    "    print('Once installation is successful, rerun this cell again.')\n",
    "\n",
    "repo = \"https://github.com/scottprahl/RigolWFM/raw/master/wfm/\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Motivation\n",
    "\n",
    "The `.wfm` format offers a few nice advantages\n",
    "\n",
    "* saving onto a USB drive on the scope is fast\n",
    "* uploading the `.wfm` file back to the scope is (sometimes) possible\n",
    "* no need to interface to a computer\n",
    "* the files are small (one byte per point)\n",
    "* all the settings are contained in the file header\n",
    "\n",
    "The disadvantage are that different scopes (and often different firmware version) have different formats.  Worse, documentation from Rigol on these formats is sparse at best.  Finally, the Rigol software to support reading these files is klunky."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Possible Scope Models\n",
    "\n",
    "This program currently covers six classes of scopes."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### DS1000C untested\n",
    "\n",
    "Support for these models is in the program, but parsing is completely untested.\n",
    "\n",
    "Handy Abbreviations: `C`, `1000C`, `DS1000C`\n",
    "\n",
    "Specific Models: `DS1000CD`, `DS1000C`, `DS1000MD`, `DS1000M`, `DS1302CA`, `DS1202CA`, `DS1102CA`, `DS1062CA`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### DS1000E validated\n",
    "\n",
    "Handy Abbreviations: `D`, `1000D`, `DS1000D`\n",
    "\n",
    "Specific Models: `DS1102D`, `DS1052D`\n",
    "\n",
    "Handy Abbreviations: `E`, `1000E`, `DS1000E`\n",
    "\n",
    "Specific Models: `DS1000E`, `DS1102E`, `DS1052E`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### DS1000Z tested,  incorrect voltages\n",
    "\n",
    "Handy Abbreviations: `Z`, `1000Z`, `DS1000Z`,\n",
    "\n",
    "Specific Models: `DS1202Z`, `DS1074Z`, `DS1104Z`, `DS1074Z-S`,\n",
    "                  `DS1104Z-S`, `MSO1054Z`, `DS1054Z`,\n",
    "                  `MSO1074Z`, `MSO1104Z`, `DS1104Z`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### DS2000 tested\n",
    "\n",
    "Handy Abbreviations: `2`, `2000`, `DS2000`,\n",
    "\n",
    "Specific Models: `DS2102A`, `MSO2102A`, `MSO2102A-S`,\n",
    "                 `DS2202A`, `MSO2202A`, `MSO2202A-S`,\n",
    "                 `DS2302A`, `MSO2302A`, `MSO2302A-S`\n",
    "                 "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### DS4000 validated\n",
    "\n",
    "Handy Abbreviations: `4`, `4000`, `DS4000`,\n",
    "\n",
    "Specific Models: `DS4054`, `DS4052`, `DS4034`, `DS4032`, `DS4024`,\n",
    "                 `DS4022`, `DS4014`, `DS4012`, `MSO4054`, `MSO4052`, `MSO4034`,\n",
    "                 `MSO4032`, `MSO4024`, `MSO4022`, `MSO4014`, `MSO4012`]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### DS6000 untested\n",
    "\n",
    "Support for these models is in the program, but parsing is completely untested.\n",
    "\n",
    "Handy Abbreviations: `6`, `6000`, `DS6000`\n",
    "\n",
    "Specific Models: `DS6062`, `DS6064`, `DS6102`, `DS6104`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The `Wfm` class\n",
    "\n",
    "This is a class with two basic methods to create objects from files and urls:\n",
    "\n",
    "* Wfm.from_file(file_name, model)\n",
    "* Wfm.from_url(url, model)\n",
    "\n",
    "where `model` describes the scope.  \n",
    "\n",
    "It also has a methods to manipulate the data.\n",
    "\n",
    "* Wfm.describe()\n",
    "* Wfm.csv()\n",
    "* Wfm.plot()\n",
    "\n",
    "The first two return strings.  The third produces a basic `matplotlib.pyplot.plt` object."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example for a remote file\n",
    "\n",
    "First let's have look at the description of the internal file structure. We see that only channel 1 has been enabled."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "downloading 'https://github.com/scottprahl/RigolWFM/raw/master/wfm/DS1102E-D.wfm?raw=true'\n"
     ]
    }
   ],
   "source": [
    "# raw=true is needed because this is a binary file\n",
    "wfm_url = repo + \"DS1102E-D.wfm\" + \"?raw=true\"  \n",
    "w = rigol.Wfm.from_url(wfm_url, 'E')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Sample description"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    General:\n",
      "        File Model   = wfm1000e\n",
      "        User Model   = E\n",
      "        Parser Model = wfm1000e\n",
      "        Firmware     = unknown\n",
      "        Filename     = DS1102E-D.wfm\n",
      "        Channels     = [1, 2]\n",
      "\n",
      "     Channel 1:\n",
      "         Coupling =  unknown\n",
      "            Scale =     2.00  V/div\n",
      "           Offset =     2.40  V\n",
      "            Probe =       1X\n",
      "         Inverted =    False\n",
      "\n",
      "        Time Base =  100.000 µs/div\n",
      "           Offset =    0.000  s\n",
      "            Delta =  400.000 ns/point\n",
      "           Points =     8188\n",
      "\n",
      "         Count    = [        1,        2,        3  ...      8187,     8188]\n",
      "           Raw    = [       41,       41,       41  ...       110,      110]\n",
      "           Times  = [-1.638 ms,-1.637 ms,-1.637 ms  ...  1.637 ms, 1.638 ms]\n",
      "           Volts  = [  4.48  V,  4.48  V,  4.48  V  ...  -1.04  V, -1.04  V]\n",
      "\n",
      "     Channel 2:\n",
      "         Coupling =  unknown\n",
      "            Scale =     5.00  V/div\n",
      "           Offset =   -15.80  V\n",
      "            Probe =       1X\n",
      "         Inverted =    False\n",
      "\n",
      "        Time Base =  100.000 µs/div\n",
      "           Offset =    0.000  s\n",
      "            Delta =  400.000 ns/point\n",
      "           Points =     8188\n",
      "\n",
      "         Count    = [        1,        2,        3  ...      8187,     8188]\n",
      "           Raw    = [      204,      204,      204  ...       178,      178]\n",
      "           Times  = [-1.638 ms,-1.637 ms,-1.637 ms  ...  1.637 ms, 1.638 ms]\n",
      "           Volts  = [400.00 mV,400.00 mV,400.00 mV  ...   5.60  V,  5.60  V]\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "description = w.describe()\n",
    "print(description)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Sample Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEWCAYAAABv+EDhAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/Il7ecAAAACXBIWXMAAAsTAAALEwEAmpwYAABByklEQVR4nO2deZwVxbX4v4cdEQUB1xFR3DEKgj7jlrglbnFJ9EWT94tJzM8lMT9jEo0x70USNdGE+PISs5loNHF7akLihigqaDZ0UBREEVBQEARBEJB9zu+P6su9M8ydW9Vz63b1vfX9fHqmb3f16dPV1XWq6tQiqkokEolEGo8uWSsQiUQikWyIBiASiUQalGgAIpFIpEGJBiASiUQalGgAIpFIpEGJBiASiUQalGgAIpE6QkSOEJFZIrJKRM7IWp9I2EQDEAkGEZkrImtEZKWILBeRf4jIRSLSJTnfJCJ/EpF3RWSFiEwXkc+XXH+ziMwUkZbS48m5A0RkfHLtFoNfRGQ7ERkrIqtFZJ6IfKbk3Cki8rdEp0Ui8jsR6VtyfqKIrE0y3cL2YNrn7CTfB25S1a1V9S9VkBepY6IBiITGJ1S1L7AbcD3wLeCW5NwfgbeScwOA/wO8U3Lti8CXgefbkbsBuBc4v8x9fwGsB3YAPgv8SkSGJee2Ba4Fdgb2A3YBftzm+kuSTLewfaITz9kZdgNeroKcSCOgqnGLWxAbMBc4vs2xQ4EW4ABgFTDcQs7fgM+XObenSfatjvXBZP57lxz7I3B9GRmfBKaV/J4IfKlaz9lO+C8AD5b8ngXcV/L7LWA4MCeRsSaJq56JbtcC/0iOPYgxnncC7wPPAUOyfvdxy2aLNYBI0Kjqs8B84CjgX8AvROQcERlcxdvsDWxU1ddKjr0IDCsT/miqXMpu85xtmQQcJSJdRGRnoAfwYQAR2QPYGnhJVYcCb2JqF1ur6rrk+nMwtaVdgKHAP4HfA9sBrwBXV/NZIvkhGoBIHngbk1mdDTwD/Bfw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l8k85BR56qPI1belm8RZdEuRWDp1x58yBPfboOMxrr8E++9jJK8TH978P//Vf9npYDnwE3OLCJm4LzJtX+Z0X/Cynn24v94474D/+o3K4NAUIX3GxciVsvXXHYQrt8scfby/3uuvgqqvsw3frBuPGwcCB5ve083/abrju3SFplemQmeUmI57S/uF162C//YZx//33dyi30LPolVdg4ULo3RumtJF50EFu6dyGhp8LaPp092t++cvKYQrOPhceftj9mmrSo4f7NQVHXke89Za73Jtvdr8ma6ZNqxwmTT+G2bPdr8ma5csrh9lrL3e53/2u+zU2tOcvqBYf+cixrFu3jptLEvVLL73EM8884yTHR8ePhjcAVfSn5J7tt89ag3xjUzrr3du/Hnlhm23cr3GpsYRCly7C2LFjmTBhAkOHDmXYsGF8+9vfZscdd3SSM2XKczQ1NXHfffdx4YUXMmzYsE7rlrUPIHOis7NIHj+ukKh29TySjhDT8c4778y9997b7rnp06dTus7VBReMbjfciBGHMH/+/Krq1fDl31gDiFQLGwMQYuYUyQfV7i0F0QB4MwDxQy/SKHGRZQ2gUeK4kfExULPhDUAaTjzRj9wBA/zIteXDKeZi9ZXxHHWUH7m2WM6m2wobA3DAAe5yq8mNN/qTXerfsEkXaeK4ioNgg6JSjykwYwSqTcP7AMD0flm3rnK4yZPhsMMqd3ssZdw4O4Ox9dbw+c/byezTBy66CMaMqRz20kvhD3+wk7vDDrDddnaTZj35JBx3nJ3cAs88A0ceWTnc1lvDzjvby/3ud+F736sc7rOfhWeftZN59NGmD/m8dpfSbs1f/wpnnGHnT+rf3/x/803YddfK4V19VKNHw9VXdxzmssvgtNPAtjn5lFNg0SJatVOX45Zb4EtfspNbyPQWLKj8vletgr597bpqFozPT34CX/+66Vq5337lw8+caV+Q6dPHdLfde+/KYd95x74HXP/+5hmHD3frbttZYg0gBT5KvSJ+2vjATd96d4r7jAtftaHYvFMkpuXqEg2AAz4TVHsjKqslN2LwFRcxjv0T49gP0QB4wjUz79Klfkt69fpcIRHjOGwWLVrEOeecw9ChQxk5ciQnn3wy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Vr5lt0M0AGnIOnH7nArCFp+9MkLIHEPqoRKnggin8FBnTuhMDICInC0iL4tIi4iMykKHIAmhRBTXAwhTtg/qvRdQ1l1HQzFaHZBVDWA68Eng6Yzu35r162HQILj9drj8cli+HB591JybMQNmz4bVq2HChM7dZ8ECePhhuOIKuOwyWLMmvaxnnoG77jK6Azz7LDzwACxc2Dpcc7N5HhsKH8Gbb8INN8BFF5lnHjsWfv/71mGnTXPX+cYb4Z//hKuvNnGhCtdcA/PmldfFhkceMXquXg3LlsHTT8NDD7X+ABcuNHHkwqpV8IMfwPTpRv6ECWZ/+nT47ndNGnnnHfNOXXnsseL+c8+1fm/jx8Pate4yAUaPhrPOgqeeMu/98svhyivh7rvhV78y8f/ii/Dgg7Bunbv8xYvh8583z3zVVcXjY8bAaafBu++a3y7v78034YUXzLU//SlceCGceKJ5f488Ahs2wIoV9vIK9542DW69Fe64w/zeuBFuugnGjTNxdNNNsGmTvdxSVOHf/s3c65lnjMz16028bNxowkya1FofG+64w8h56KFiGn7ySZMWfaCqmW3ARGCUbfiRI0dq1bnySlUTzVtu//xncf/cc4v7jzxSWW7h2nHjisd69Ggt/5hjiud22031vPPsdN5226KMK64wxwq/+/VrHbZw3IavflW1f//y8dHSsqXcp5+uLPexx9qX94c/tK/fVlupfvObleWuWdNa3rnnqh5ySGv5Bfr1M8eamuzi4pxzysdDue355yvLveuuYvipU80xMO9U1RwD1QsvLJ67+urKclta3PW1TRennqp68MFFfUq3J55o//i8eZXl3nxz62v226/17y9/2fy/6irVww4z+9/5TmW577+/pT5PPmnise3x665TPfZY1aOOsouLY44xYf/0py1lfehD5v8116iuXFk8vmxZZbk//GExfN++xf3rrzf/zzzTTr8yAM3aTp7azY9ZqR4icgFwAcDgwYOrf4OWlvLnSkv8aUp5AH//O2yzjdkvlNYLPPWUKYn17u1W4istDT38MJx+evH38uUwcSL06OGua0sLvPde+fN/+xt07eout1Aiasv48cX9v//dxM+KFelLZQ89BCtXtpY/dKjZL9SCbGWX07maPP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JRBqUaAAikUikQYkGINIwiMiAkpkZF5XM1LhKRH7p6Z5fE5HPpbiuh4g8LSJ1PVgzki2xG2ikIRGR0cAqVR3j8R7dMGNJDtbifEsu11+NmRzszqorF4kQawCRCCLyURF5KNkfLSK3i8gzIjJPRD4pIj8SM5/+oyLSPQk3MpkscIqIjC8zY+axwPOFzF9EJkqyfoOIDBSRucn+MBF5NqmNvCQieyXX/wX4rN+njzQy0QBEIlsyFJN5nwbcATylqh8C1gCnJEbg58BZqjoSuBW4rh05RwBTLO53EfA/qjocM9q8MOvsdOCQTjxHJNIhsX0xEtmScaq6QUSmYRbpeDQ5Pg2zYNA+wAGYmTVJwrQ3X85OwCsW9/sn8B0RaQL+rKqzAFR1k4isF5G+qrqyMw8UibRHNACRyJYUZoNtEZENWnSUtWC+GQFeVtUPV5CzBujV5pgk/7sXDqjqXSIyGTgFeERELlTVJ5PTPYG16R8lEilPbAKKRNyZCQwSkQ8DiEj3MmtGvALs2eZYoUnno5iaQ2HW2ddV9WeYmS4PTI4PAN5V1Q1Vf4JIhGgAIhFn1CzXdxZwg4i8iJk59vB2go7DrBVbyvEi8hxwPLBMRP4f8O/AdBGZimla+kMS9hjg4ao/QCSSELuBRiIeSRZguUJVZ4nIRMwi4c2W1/4Zsxj6az51jDQusQYQifjlSowz2IlkQZC/xMw/4pNYA4hEIpEGJdYAIpFIpEGJBiASiUQalGgAIpFIpEGJBiASiUQalGgAIpFIpEH5/4ynrDwnKMHUAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "w.plot()\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Sample `.csv` file"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "X,CH 1,CH 2,Start,Increment\n",
      "µs, V, V,-6.000000e-04,1.000000e-06\n",
      "-1637.600000,4.48,0.40\n",
      "-1637.199951,4.48,0.40\n",
      "-1636.799902,4.48,0.40\n"
     ]
    }
   ],
   "source": [
    "s = w.csv()\n",
    "\n",
    "# just show the first few entries\n",
    "rows = s.split('\\n')\n",
    "for i in range(5):\n",
    "    print(rows[i])\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example for a local file\n",
    "\n",
    "You will need to adjust the path and filename for your computer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    General:\n",
      "        File Model   = wfm1000e\n",
      "        User Model   = E\n",
      "        Parser Model = wfm1000e\n",
      "        Firmware     = unknown\n",
      "        Filename     = DS1102E-D.wfm\n",
      "        Channels     = [1, 2]\n",
      "\n",
      "     Channel 1:\n",
      "         Coupling =  unknown\n",
      "            Scale =     2.00  V/div\n",
      "           Offset =     2.40  V\n",
      "            Probe =       1X\n",
      "         Inverted =    False\n",
      "\n",
      "        Time Base =  100.000 µs/div\n",
      "           Offset =    0.000  s\n",
      "            Delta =  400.000 ns/point\n",
      "           Points =     8188\n",
      "\n",
      "         Count    = [        1,        2,        3  ...      8187,     8188]\n",
      "           Raw    = [       41,       41,       41  ...       110,      110]\n",
      "           Times  = [-1.638 ms,-1.637 ms,-1.637 ms  ...  1.637 ms, 1.638 ms]\n",
      "           Volts  = [  4.48  V,  4.48  V,  4.48  V  ...  -1.04  V, -1.04  V]\n",
      "\n",
      "     Channel 2:\n",
      "         Coupling =  unknown\n",
      "            Scale =     5.00  V/div\n",
      "           Offset =   -15.80  V\n",
      "            Probe =       1X\n",
      "         Inverted =    False\n",
      "\n",
      "        Time Base =  100.000 µs/div\n",
      "           Offset =    0.000  s\n",
      "            Delta =  400.000 ns/point\n",
      "           Points =     8188\n",
      "\n",
      "         Count    = [        1,        2,        3  ...      8187,     8188]\n",
      "           Raw    = [      204,      204,      204  ...       178,      178]\n",
      "           Times  = [-1.638 ms,-1.637 ms,-1.637 ms  ...  1.637 ms, 1.638 ms]\n",
      "           Volts  = [400.00 mV,400.00 mV,400.00 mV  ...   5.60  V,  5.60  V]\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "path = \"../wfm/\"\n",
    "filename =  \"DS1102E-D.wfm\"\n",
    "wfm_name = path + filename\n",
    "w = rigol.Wfm.from_file(wfm_name, 'E')\n",
    "\n",
    "description = w.describe()\n",
    "print(description)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernel_info": {
   "name": "python3"
  },
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.1"
  },
  "nteract": {
   "version": "0.15.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
